package com.yxx.exception;

import lombok.Getter;

import static com.yxx.enums.StatusCodeEnum.FAIL;

/**
 * 业务异常
 * @author yuxiangxun
 * @date 2025/1/17
 * @apiNote
 */

@Getter
public class ServiceException extends RuntimeException {

    /**
     * 放回失败状态码
     */
    private final Integer code = FAIL.getCode();

    /**
     * 返回信息 有参构造器  参数为String类型的message
     */
    private final String message;

    public ServiceException(String message){
        this.message = message;
    }
}
